package org.example.chat.entity;

import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@Table(name = "region_info")
public class RegionInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Comment("地区编码")
    @Column(name = "cri_code", nullable = false, length = 40)
    private String code;

    @Column(name = "cri_name", nullable = false, length = 50)
    @Comment("地区名称")
    private String name;

    @Column(name = "cri_short_name", length = 50)
    @Comment("地区名简写")
    private String shortName;

    @Column(name = "cri_superior_code", nullable = false, length = 40)
    @Comment("上级地区编码")
    private String superiorCode;

    @Column(name = "cri_lng", length = 20)
    @Comment("地区经度")
    private String lng;

    @Column(name = "cri_lat", length = 20)
    @Comment("地区纬度")
    private String lat;

    @Column(name = "cri_sort")
    @Comment("排序顺序")
    private Integer sort;

    @Column(name = "cri_data_state")
    @Comment("数据状态")
    private Integer state;

    @Column(name = "cri_level", length = 11)
    @Comment("地区级别")
    private String level;
}
